package com.program.facesigninsystem.service.impl;

import com.program.facesigninsystem.dao.IAdminGroupDao;
import com.program.facesigninsystem.entity.AdminGroup;
import com.program.facesigninsystem.iteration.mapper.AdminGroupMapper;
import com.program.facesigninsystem.service.IAdminGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class AdminGroupService implements IAdminGroupService {
    @Autowired
    private IAdminGroupDao iAdminGroupDao;
    @Resource
    AdminGroupMapper adminGroupMapper;

    @Override
    public void insertAdminGroup(String uid, int bindid,String groupname) {
        iAdminGroupDao.insertAdminGroup(uid, bindid,groupname);
    }

    @Override
    public AdminGroup selectExist(String uid, int bindid) {
        return iAdminGroupDao.selectExist(uid, bindid);
    }

    @Override
    public void deleteAdminGroup(String uid, int bindid) {
        iAdminGroupDao.deleteAdminGroup(uid, bindid);
    }

    @Override
    public List<Map<String, Object>> selectList(String uid) {
        return iAdminGroupDao.selectList(uid);
    }
}
